diff options
Diffstat (limited to 'src/pages/sujet/[slug].tsx')
| -rw-r--r-- | src/pages/sujet/[slug].tsx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index 348fe05..6277293 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -2,6 +2,7 @@ import Heading from '@components/atoms/headings/heading'; import ResponsiveImage from '@components/molecules/images/responsive-image'; import PostsList, { type Post } from '@components/organisms/layout/posts-list'; import LinksListWidget from '@components/organisms/widgets/links-list-widget'; +import { getLayout } from '@components/templates/layout/layout'; import PageLayout, { type PageLayoutProps, } from '@components/templates/page/page-layout'; @@ -12,7 +13,12 @@ import { getTotalTopics, } from '@services/graphql/topics'; import styles from '@styles/pages/topic.module.scss'; -import { type Article, type PageLink, type Topic } from '@ts/types/app'; +import { + type Article, + type NextPageWithLayout, + type PageLink, + type Topic, +} from '@ts/types/app'; import { loadTranslation, type Messages } from '@utils/helpers/i18n'; import { getLinksListItems, @@ -21,7 +27,7 @@ import { } from '@utils/helpers/pages'; import useBreadcrumb from '@utils/hooks/use-breadcrumb'; import useSettings from '@utils/hooks/use-settings'; -import { GetStaticPaths, GetStaticProps, NextPage } from 'next'; +import { GetStaticPaths, GetStaticProps } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; import Script from 'next/script'; @@ -35,7 +41,10 @@ export type TopicPageProps = { translation: Messages; }; -const TopicPage: NextPage<TopicPageProps> = ({ currentTopic, topics }) => { +const TopicPage: NextPageWithLayout<TopicPageProps> = ({ + currentTopic, + topics, +}) => { const { content, intro, meta, slug, title } = currentTopic; const { articles, @@ -208,6 +217,9 @@ const TopicPage: NextPage<TopicPageProps> = ({ currentTopic, topics }) => { ); }; +TopicPage.getLayout = (page) => + getLayout(page, { useGrid: true, withExtraPadding: true }); + interface TopicParams extends ParsedUrlQuery { slug: string; } |
